﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Text;

namespace GMPP.utils
{
    public class Terrain
    {

        public enum Details
        {
            Grass,
            Rock,
            Dirty
        }

        public HeightMap Hm { private set; get; }

        public Terrain(string path, double width, double length, double height)
        {
            InitHeightmap(path, width, length, height);


        }

        private void InitHeightmap(string path, double width, double length, double height)
        {
            var image = new Bitmap(path + "\\" + "terrain.png");
            var rect = new Rectangle(0, 0, image.Width, image.Height);
            var bitmapdata = image.LockBits(rect, ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
            Hm = new HeightMap(bitmapdata, width, length, height, "terrain_texture.jpg");
        }
        
        private void InitDetailsPosition()
        {
            
        }
    }
}
